package com.yqg.manage.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;

import com.yqg.manage.entity.Term;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zxf
 * @since 2025-07-26
 */
public interface TermMapper extends BaseMapper<Term> {

    List<Term> getDataList(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("lawType") String lawType, @Param("lawName") String lawName, @Param("article") String article, @Param("paragraph") String paragraph, @Param("subparagraph") String subparagraph, @Param("item") String item);

    Integer getDataListCount(@Param("lawType") String lawType, @Param("lawName") String lawName, @Param("article") String article, @Param("paragraph") String paragraph, @Param("subparagraph") String subparagraph, @Param("item") String item);

    /**
     * 删除前判断是否有违法行为
     * @param termId 条款id
     * @return 使用的条数
     */
    Integer deleteBeforeVerify(@Param("termId") Long termId);
}
